package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.Business;
import com.hzncc.flowable_diboot.entity.Clue;
import com.hzncc.flowable_diboot.entity.Customer;
import com.hzncc.flowable_diboot.entity.ToDoList;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 待办 VO定义
* @author MyName
* @version 1.0
* @date 2024-06-21
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class ToDoListListVO extends ToDoList  {
private static final long serialVersionUID = 1578877269110180563L;
    /**
    * 指派人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.dis_person = id"
     )
    private String disPersonLabel;

    /**
    * 执行人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.executor = id"
     )
    private String executorLabel;

    /**
    * 客户id 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "name",
        condition = "this.customer = id"
     )
    private String customerLabel;

    /**
    * 下次联系时间 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "nextConnectTime",
        condition = "this.customer = id"
     )
    private String nextContact;

    /**
    * 最后跟进时间 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "lastFollwUpTime",
        condition = "this.customer = id"
     )
    private String lastFollow;

    /**
    * 详细地址 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "address",
        condition = "this.customer = id"
     )
    private String address;

    /**
    * 线索id 关联信息
    */

    @BindField(
        entity = Clue.class,
        field = "name",
        condition = "this.clue_id = id"
     )
    private String clueIdLabel;

    /**
    * 客户级别 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "rank",
        condition = "this.customer = id"
     )
    private String rank;

    @BindDict(
            type = "customer_rank",
            field = "rank"
    )
    private LabelValue rankLabel;

    /**
    * 线索来源 关联信息
    */

    @BindField(
        entity = Clue.class,
        field = "source",
        condition = "this.clueId = id"
     )
    private String source;

    @BindDict(
            type = "clueSources",
            field = "source"
    )
    private LabelValue sourceLabel;

    /**
    * 商机id 关联信息
    */

    @BindField(
        entity = Business.class,
        field = "name",
        condition = "this.business_id = id"
     )
    private String businessIdLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}